<template>
    <view class="container">
        <view class="share-info">
            <image
                :src="baseUrl + '/api/user/qrcode?uid=' + userId"
                class="image"
            ></image>
        </view>
        <view class="board">
            <view class="rule-title">————【 代言人活动规则 】————</view>
            <view class="rule-content">
                <view class="p"> 1、获代言人纪念藏品空投；</view>
                <view class="p">2、享推广提成20%现金福利（永久）；</view>
                <view class="p">3、额外赠送全部代言粉丝注册成功的积分奖励+10；</view>
                <view class="p">4、享全系列藏品优先购</view>
                <view class="p">5、享全系列打折</view>
            </view>
        </view>
        <view class="board">
            <view class="rule-title">————【 竞选规则 】————</view>
            <view class="rule-content">
                <view class="p"> 1、邀请排行榜前100名参与竞选</view>
                <view class="p"> 2、代言人粉丝联盟超100人</view>
            </view>
        </view>
    </view>
</template>

<script>
    import { baseUrl } from "@/config/config"
    export default {
        name: "agent",
        data() {
            return {
                baseUrl: baseUrl
            }
        },
        onLoad() {
            //#ifdef H5
            var than = this
            const wx = require('jweixin-module');
            wx.ready(function () {
                wx.updateAppMessageShareData({
                    title: '数藏一品', // 分享标题
                    desc: '数藏一品', // 分享描述
                    link: than.baseUrl + '/#/pages/share/register?inviteCode=' + than.$store.getters.inviteCode, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                    imgUrl: 'https://img.ionepin.com/ed7658bc6591ca5b8a3509ae3873d1f14ae9d3db.png', // 分享图标
                    success: function () {
                        // 用户点击了分享后执行的回调函数
                        //alert('分享成功')
                    }
                })
            })
            //#endif
        },
        computed: {
            userId() {
                return this.$store.getters.userId
            }
        }
    }
</script>

<style lang="scss" scoped>
    .container {
        box-sizing: border-box;
        width: 100%;
        //height: 100vh;
        background: url("https://img.ionepin.com/157e0df67e2e95e490bcf72a5b04bb5dd1270c63.png") no-repeat;
        background-size: 100% 100%;
        padding-top: 40rpx;
        padding-bottom: 40rpx;
        .share-info {
            width: 581rpx;
            height: 928rpx;
            background: url("https://img.ionepin.com/9d0a7d2d9b644560e45d9497028c7bd41d66a396.png") no-repeat;
            background-size: 100% 100%;
            margin: 0 auto 0 auto;
            position: relative;
            .image {
                position: absolute;
                width: 250rpx;
                height: 250rpx;
                bottom: 80rpx;
                left: 50%;
                margin-left: -125rpx;
            }
        }
        .board {
            background: url("https://img.ionepin.com/842d0a7c2aa2e92d8b21fb620bcffca7a19106de.png") no-repeat;
            background-size: 100% 100%;
            margin: 30rpx 26rpx 0 26rpx;
            padding: 35rpx 42rpx;
            .rule-title {
                font-size: 28rpx;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #FFFFFF;
                text-align: center;
            }
            .rule-content {
                font-size: 22rpx;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #FFFFFF;
                line-height: 1.5;
                margin-top: 33rpx;
            }
        }
    }
</style>
